Accessibility

DRK Volume 4 Article

Application Graphics Library


The Application Graphics Library is a set of graphics and icons that you can use to design and build applications within Macromedia Flash MX. The library contains nearly 60 graphics and icons, divided into five categories (see Figures 1–5):


Figure 1. Graphics from the File category


Figure 2. Graphics from the Icon category


Figure 3. Graphics from the Objects category


Figure 4. Graphics from the OS category


Figure 5. Graphics from the Sound Buttons category

Installing the Library

You must have the Macromedia Extension Manager installed in order to install the Application Graphics Library. If you do not have the Macromedia Extension Manager installed, you can get it directly from the DRK or from the Macromedia website.

Before you install the library, you must close the Macromedia Flash MX authoring environment.

Install the library by double-clicking application_library.mxp. This opens the Macromedia Extension Manager, which installs the library for you automatically.

You may also install the library by first opening the Macromedia Extension Manager, selecting File > Install Extension, and then navigating to application_library.mxp on the DRK.

Using the Library

Once you have installed the library, you can access it from the Common Libraries menu: Window > Common Libraries > Application Graphics Library.

This opens a window which lists all the graphics in the library, divided into folders or categories (see Figure 6).


Figure 6. Opening the Application Graphics Library

You can preview the graphics by selecting a folder and then choosing an individual symbol. This places the graphic in the preview window at the top of the panel (see Figure 7).

[IMG: lib_screen_phone.gif" border="0" />
Figure 7. Previewing the phone graphic

In order to incorporate one of the graphics from the library into your application, simply select the symbol within the panel and drag it into your application.

You can also include the graphic within your application to be inserted at runtime. Drag the graphic directly from the Application Graphics library to your application library and then specify a linkage ID for the symbol so that ActionScript can access it at runtime.

Here's how you do this:

  1. Open the Application Graphics Library panel.
  2. Open the library for your application by selecting Window > Library.
  3. Select the graphic from the Application Graphics Library and drag it into your library.
  4. Right-click the symbol in your library and select Linkage (see Figure 8).

  5. Figure 8. Selecting the linkage setting within the library

  6. Click the Export for ActionScript button.
  7. Specify a linkage name.

You can now dynamically include the graphic in your application at runtime by using the attachMovie command (see Figure 9):

this.attachMovie("Telephone", "phoneGraphic", 235);


Figure 9. Setting the linkage properties for the symbol

This attaches the graphic from the library to the movie clip within which the ActionScript is executed. You can view an example of this in example.fla.

You can find more information on this topic by reading the documentation for the MovieClip.attachMovie function in the ActionScript online documentation or in the Reference panel.